package com.logictech.lims.dao.impl;

import java.util.List;

import org.jeecgframework.p3.core.utils.common.PageQuery;
import org.jeecgframework.p3.core.utils.common.PageQueryWrapper;
import org.jeecgframework.p3.core.utils.persistence.mybatis.GenericDaoDefault;
import org.springframework.stereotype.Repository;
import com.logictech.lims.dao.PreparationTypeDao;
import com.logictech.lims.dto.PreparationTypeDto;
import com.logictech.lims.entity.PreparationType;

/**
 * 描述：</b>PreparationTypeDaoImpl<br>
 * @author：guoqi
 * @since：2017年03月21日 16时10分42秒 星期二 
 * @version:1.0
 */
@Repository("preparationTypeDao")
public class PreparationTypeDaoImpl extends GenericDaoDefault<PreparationType> implements PreparationTypeDao{

	@SuppressWarnings("unchecked")
	@Override
	public List<PreparationTypeDto> queryList(PageQuery<PreparationTypeDto> pageQuery) {
		return (List<PreparationTypeDto>)super.query("queryList",pageQuery);
	}

	@Override
	public Integer count(PageQuery<PreparationTypeDto> pageQuery) {
		return (Integer) super.queryOne("count",pageQuery);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<PreparationTypeDto> queryPageList(
			PageQuery<PreparationTypeDto> pageQuery,Integer itemCount) {
		PageQueryWrapper<PreparationType> wrapper = new PageQueryWrapper<PreparationType>(pageQuery.getPageNo(), pageQuery.getPageSize(),itemCount, pageQuery.getQuery());
		return (List<PreparationTypeDto>)super.query("queryPageList",wrapper);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<PreparationTypeDto> queryAll(String name) {
		return super.query("queryAll",name);
	}

}

